#ifndef _TRACE_INCLUDE_LOGGER_
#define _TRACE_INCLUDE_LOGGER_

#include <typeinfo> // typeid need
#include <cxxabi.h> // abi need
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks/text_file_backend.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/support/date_time.hpp>
#include <boost/log/attributes/mutable_constant.hpp>

// get class name
static int demangleStatus; 
#define __CLASS__ __class__
#define __class__ abi::__cxa_demangle(typeid(*this).name(), 0, 0, &demangleStatus)

#define TRACE(priority) BOOST_LOG_TRIVIAL(priority)  << __CLASS__<<"::"<<__func__ << ":" <<__LINE__ << "\t"
#define TRACE_LOG(priority) BOOST_LOG_TRIVIAL(priority) << __func__ << ":" <<__LINE__ << "\t"

class BoostLog
{
public:
    BoostLog() = delete;
    ~BoostLog() = delete;
    static void initBoostLog(bool enable);
};


#endif
